package service.impl;

import DAO.TelevisionDao;
import bean.Television;
import service.TelevisionService;
import java.util.List;

public class TelevisionServiceImpl implements TelevisionService {
    private final TelevisionDao televisionDao;

    public TelevisionServiceImpl(TelevisionDao televisionDao) {
        this.televisionDao = televisionDao;
    }

    @Override
    public List<Television> getAllTelevisions() {
        return televisionDao.getAllTelevisions();
    }

    @Override
    public Television getTelevisionById(Integer id) {
        return televisionDao.getTelevisionById(id);
    }

    @Override
    public int addTelevision(Television television) {
        return televisionDao.addTelevision(television);
    }

    @Override
    public int updateTelevision(Television television) {
        return televisionDao.updateTelevision(television);
    }

    @Override
    public int deleteTelevision(Integer id) {
        return televisionDao.deleteTelevision(id);
    }

    @Override
    public List<Television> getTelevisionsBySubCategoryId(int subCategoryId) {
        return televisionDao.getTelevisionsBySubCategoryId(subCategoryId);
    }
} 